-
Notifications
You must be signed in to change notification settings - Fork 121
CIAB Bookings: Add eligibility check for Bookings tab #16139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
RafaelKayumov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just left a question.
| if let status, (products.filter { $0.statusKey == status.rawValue }.isEmpty) == false { | ||
| return onCompletion(.success(true)) | ||
| } else if status == nil { | ||
| } else if let productType, products.contains(where: { $0.productTypeKey == productType.rawValue}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Should we also update StorageType.loadProducts() and include product type into query instead of doing local filtering after a storage fetch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thinking! I optimized the code in bd9d56d, let me know what you think @RafaelKayumov.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx! ![]()

Part of WOOMOB-1231
Description
This PR adds a new eligibility checker to determine if Bookings tab should be displayed for a store. The conditions include:
The checker will be used in a subsequent PR for showing Bookings tab.
Testing steps
Since the checker is not used yet, just unit tests passing should be sufficient.
Testing information
Added unit tests for
ProductStore,SessionManager, andBookingsTabEligibilityCheckerProtocol.Screenshots
N/A
RELEASE-NOTES.txtif necessary.